package org.jmc.refmanager.domain.model.filter;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;

public abstract class AbstractFilter {
	
	/**
	 * 
	 * @param except
	 * @return
	 */
	protected static String[] getExcludeProperties(final String[] allProps, final String[] except) {
		if (except == null || except.length == 0) {
			return allProps;
		}
		List<String> propertiesList = new ArrayList<String>();
		Collections.addAll(propertiesList, allProps);
		propertiesList.removeAll(Arrays.asList(except));
		
		return propertiesList.toArray(new String[propertiesList.size()]);
	}

}
